package com.gh.manager.train.service;

import java.util.List;

import com.gh.manager.train.domain.GhTrain;
import com.gh.manager.train.dto.TrainDetailDto;

/**
 * 训练Service接口
 * 
 * @author andas
 * @date 2024-12-12
 */
public interface IGhTrainService 
{
    /**
     * 查询训练
     * 
     * @param trainId 训练主键
     * @return 训练
     */
    public GhTrain selectGhTrainByTrainId(Long trainId);

    /**
     * 查询训练列表
     * 
     * @param ghTrain 训练
     * @return 训练集合
     */
    public List<GhTrain> selectGhTrainList(GhTrain ghTrain);

    /**
     * 新增训练
     * 
     * @param ghTrain 训练
     * @return 结果
     */
    public int insertGhTrain(GhTrain ghTrain);

    /**
     * 修改训练
     * 
     * @param ghTrain 训练
     * @return 结果
     */
    public int updateGhTrain(GhTrain ghTrain);

    /**
     * 批量删除训练
     * 
     * @param trainIds 需要删除的训练主键集合
     * @return 结果
     */
    public int deleteGhTrainByTrainIds(Long[] trainIds);

    /**
     * 删除训练信息
     * 
     * @param trainId 训练主键
     * @return 结果
     */
    public int deleteGhTrainByTrainId(Long trainId);

    void join(Long trainId, Long userId, Long type);

    TrainDetailDto selectUserByTrainId(GhTrain ghTrain, Long type);
}
